<?php
    $_path = "../";
    //Modificacio Paths si estem fen ajax desde algun modul
    if ($_SERVER["PHP_SELF"] != "/index.php") $_path = "../../";

    require('Smarty.class.php');
    $smarty = new Smarty;
    
    
    $smarty->compile_dir = $_path.'Smarty/compiles/';
    $smarty->config_dir   = $_path.'Smarty/config/';
    $smarty->cache_dir    = $_path.'Smarty/cache/';
    $smarty->left_delimiter = '<!{';
    $smarty->right_delimiter = '}>';

    $aThemes = array("watercolor", "black");
    $idTheme = 0;

    $smarty->template_dir = $_path.'Smarty/templates/'.$aThemes[$idTheme]."/";
    //$smarty->assign("template_dir", $smarty->template_dir);
    $smarty->assign("template_dir", 'templates/'.$aThemes[$idTheme]."/");
?>
